import type { ReactElement } from "react";
import type { RouteObject } from "react-router-dom";

export interface XMeta {
  icon?: React.ReactNode;
  title?: string | ReactElement;
}
//meta属性和hidden属性都是自定义属性，meta用来保存当前路由的标题和对应的图标，用来在侧边栏展示所有的路由列表
//hidden主要控制当生成面包屑导航时，是否把当前路由的标题添加到导航上
export interface XRoute extends RouteObject {
  meta?: XMeta;
  children?: XRoutes;
  hidden?: boolean;
}

export type XRoutes = XRoute[];
